package im.elephas.androfan.util;

public class TagFilter {
	public static String getTag(String str) {
		if (str.length() == 0)
			return str;
		if (str.charAt(0) != '<' && str.charAt(str.length() - 1) != '>')
			return str;

		String re = "";
		boolean flag = false;
		for (char c : str.toCharArray()) {
			if (c == '>' && flag == false) {
				flag = true;
				continue;
			}
			if (c == '<' && flag == true) {
				break;
			}
			if (flag == true) {
				re += c;
			}
		}
		return re;
	}
}
